import java.util.Scanner;

public class h_7 {
    public static void main(String[] args) {
        System.out.println("输入一行字符");
        Scanner sc=new Scanner(System.in);
        int yw=0;
        int kg=0;
        int sz=0;
        int qt=0;
        String str=sc.nextLine();
        char[] ch=str.toCharArray();
        for(int i=0;i<ch.length;i++){
            if(ch[i]>='a'&&ch[i]<='z'||ch[i]>='A'&&ch[i]<='Z'){
                yw++;
            }else if (ch[i]==' '){
                kg++;
            }else if(ch[i]>='0' && ch[i]<='9') {
                sz++;
            }else {
                qt++;
            }
        }
        System.out.println("英文："+yw+"空格："+kg+"数字："+sz+"其他："+qt);
    }
}
